<?php

require_once dirname(__FILE__) . '/../../commands/Economic_RemoteCommand.php';
require_once dirname(__FILE__) . '/../../commands/Economic_GetDataCommand.php';
require_once dirname(__FILE__) . '/../../commands/Economic_RemoteCommandMediator.php';
require_once dirname(__FILE__) . '/../../commands/Economic_RemoteCommandMediatorImpl.php';
require_once dirname(__FILE__) . '/../../entities/Economic_Object.php';
require_once dirname(__FILE__) . '/../../entities/Economic_ObjectAbstractImpl.php';
require_once dirname(__FILE__) . '/../../entities/Economic_Entity.php';
require_once dirname(__FILE__) . '/../../entities/Economic_EntityData.php';
require_once dirname(__FILE__) . '/../../entities/Economic_CreatableEntityData.php';
require_once dirname(__FILE__) . '/../../entities/Economic_EntityAbstractImpl.php';
require_once dirname(__FILE__) . '/../../Economic_WebService.php';

/**
 * Test class for Economic_RemoteCommandMediator.
 * Generated by PHPUnit on 2012-02-17 at 01:15:11.
 */
class Economic_ApiCommandTestCase extends PHPUnit_Framework_TestCase {

    /**
     * @var Economic_RemoteCommandMediator
     */
    protected $mediator;

    /**
     * @var Economic_WebService 
     */
    protected $webService;

    protected function setUp() {
        $this->webService = Economic_WebService::getInstance();
        $this->mediator = new Economic_RemoteCommandMediatorImpl();
        $this->mediator->setWebService($this->webService);
    }

    public function getNewEntity($entityClassName, $entityPk, $value) {
        $dataClassName = $entityClassName . 'Data';
        $data = new $dataClassName;
        $data->$entityPk = $value;
        $entity = new $entityClassName;
        $entity->setData($data);
        return $entity;
    }

}
